/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.business.service;

import com.alibaba.fastjson.JSONObject;
import me.zhengjie.business.domain.Order;
import me.zhengjie.business.domain.vo.FwjhVo;
import me.zhengjie.business.domain.vo.FymxMrzjVo;
import me.zhengjie.business.domain.vo.OrderVo;
import me.zhengjie.business.domain.vo.OrderWxVo;
import me.zhengjie.business.service.dto.GeneralQueryCriteria;
import me.zhengjie.business.service.dto.OrderDto;
import me.zhengjie.business.service.dto.OrderQueryCriteria;
import me.zhengjie.business.service.dto.WhfaQueryCriteria;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;

/**
* @website https://el-admin.vip
* @description 服务接口
* @author xiahongbo
* @date 2022-08-03
**/
public interface OrderService {

    /**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Page<Order> queryAll(OrderQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<OrderDto>
    */
    List<OrderDto> queryAll(OrderQueryCriteria criteria);

    Page<Order> listDisability(OrderQueryCriteria criteria, Pageable pageable);


    @Transactional
    OrderDto findById(String bisOrderId);

    @Transactional
    void updateZt(Order resources);

    /**
    * 创建
    * @param resources /
    * @return OrderDto
    */
    OrderDto create(Order resources);

    /**
    * 编辑
    * @param resources /
    */
    void update(Order resources);

    /**
    * 多选删除
    * @param ids /
    */
    void deleteAll(String[] ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<OrderDto> all, HttpServletResponse response) throws IOException;

    /**
     * 生成就诊登记
     * @param resources
     */
    void makeJzdj(Order resources);

    void test(String orderID);

    Integer queryVerifyPerson(String orderId);

    /**
     * 根据月份，查询每月的订单数量
     * @param month
     * @return
     */
    List<JSONObject> groupByHlry2Count(String month);

    Map<String, Object> OrderCntList(String hlrq, Pageable pageable);

    Map<String, Object> queryAllOrderList(OrderQueryCriteria criteria, Pageable pageable);
    List<OrderVo> queryAllOrderList(OrderQueryCriteria criteria);
    void downloadAllOrderVo(List<OrderVo> all, HttpServletResponse response) throws IOException;

    Page<OrderWxVo> queryAllOrderWxVoList(OrderQueryCriteria criteria, Pageable pageable);

    Object queryAllOrderWxVoList(OrderQueryCriteria criteria, int[] startEnd, Pageable pageable);

    Object getZhJWDtest(String bisOrderZhid, String ordjd, String ordwd);
}